home *** CD-ROM | disk | FTP | other *** search
/ MacWorld Secrets (4th Edition) / Mac Secrets CD 4th Ed.toast / Apple Advanced Technologies / Apple Speech Technologies 1.5 / PlainTalk Developer Info / Speech Recognition Manager SDK / SR Sample Code / IM SR Example / MyRemoveNotificationCallBack.c < prev    next >
C/C++ Source or Header  |  1996-05-02  |  698b  |  27 lines

  1. #include <SpeechRecognition.h>
  2.  
  3. pascal void        MyRemoveNotificationCallBack (SRRecognizer recognizer);
  4.  
  5. pascal void MyRemoveNotificationCallBack (SRRecognizer recognizer)
  6. {
  7.     SRCallBackParam    myCallBackPB;
  8.     SRCallBackUPP     mySavedCallBack;
  9.     Size            myLen;
  10.     OSErr            myErr = noErr;
  11.     
  12.     myLen = sizeof (myCallBackPB);
  13.     myErr = SRGetProperty (recognizer, kSRCallBackParam, &myCallBackPB, &myLen);
  14.     if (myErr == noErr) {
  15.         if (myCallBackPB.callBack != nil) {
  16.             mySavedCallBack = myCallBackPB.callBack;
  17.             
  18.             myCallBackPB.callBack = nil;
  19.             myErr = SRSetProperty (recognizer, kSRCallBackParam, &myCallBackPB, 
  20.                                                         sizeof (myCallBackPB));
  21.             
  22.             DisposeRoutineDescriptor (mySavedCallBack);
  23.         }
  24.     }
  25. }
  26.  
  27.